-
Notifications
You must be signed in to change notification settings - Fork 418
Remove urllib3 dependency #918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Agreed, not sure what the best fix is here but im having some pain now with this too |
|
signal-boosting this because there is a CVE relating to urllib<2.5.0 |
|
Bumping for visibility here. Requirement pinning urllib3 < 2 is blocking lots of security and package updates - and is quite unnecessary.
|
|
bump, could we get this merged and released? 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As suggested this PR breaks things. But CPython < 3.10 is end-of-life and the end of this month. So we could set python_requires=">3.10" and drop the
"urllib3 <2; python_version <'3.10'", and "urllib3; platform_python_implementation !='PyPy' and python_version >='3.10'", lines.
As for the pypy pin:
I've tested pypy3.11-7.3.20 against urllib3 2.5.0 and it works.
But I failed to run them on pypy3.10-7.3.19:
help:
rpds-py(v0.28.0) was included becausevcrpy[tests](v7.0.0) depends onpytest-httpbin(v2.1.0) which depends onhttpbin(v0.10.1) which depends onflasgger(v0.9.7.1) which depends onjsonschema(v4.25.1) which depends onrpds-py
So if we want to keep supporting it we need to add a pin for jsonschema< 4.18; platform_python_implementation == 'PyPy' and python_version <='3.10' in the extras_require too. Then we can narrow the pin on urllib3 to urllib3 <2; platform_python_implementation =='PyPy and python_version <='3.10'
At the very least set python_requires=">3.10".
That CVE is regarding 2.2.0 <= urllib3 < 2.5.0. There is nothing in these pins that pins anyone to a vulnerable version. And that bug in poetry dependency resolution ought to be solved in poetry not in the rest of the whole ecosystem. |
|
For anyone looking for a solution:
vcrpy = { version = ">=7", markers = "platform_python_implementation == 'CPython'" }
[project]
name = "temp"
version = "0.1.0"
authors = [{ name = "piiq", email = "[email protected]" }]
requires-python = ">=3.12"
dependencies = ["vcrpy>=7.0.0"]
[tool.uv]
override-dependencies = [
"urllib3>=2 ; implementation_name == 'cpython' and python_version >= '3.12'",
]P.S. If this works for you feel free to link to this comment elsewhere. |
I'm not sure if this is possible at this time, but I'm working with the
uvpackage manager and having so many problems trying to installvcrpy==7.0.0with other packages needingurllib3>2. Removing this dependency here fixed all my issues.